<?php
/**
 * Created by Maxotm.
 * User: tuyt
 * Date: 2019/5/23
 */

namespace App\Http\ViewComposers;

use App\Models\Article;
use App\Models\Category;
use App\Models\Tag;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\View\View;

class HeaderComposer
{
    public function compose(View $view)
    {
        //获取点击排行
        $topGuide = [
            [
            'id'=>1,
            'name'=>'个人博客'
            ],
            [
                'id'=>2,
                'name'=>'开发笔记'
            ],
            ];


        $view->with([
            'topGuide'=>$topGuide,
        ]);
    }
}